package service.Impl;

import dao.Impl.StudentDaoImpl;
import dao.StudentDao;
import entity.Student;
import service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    StudentDao studentDao=new StudentDaoImpl();
    @Override
    public List<Student> getAll() {
        return studentDao.getAll();
    }

    @Override
    public int add(String name, String address, String sex) {
        return studentDao.add(name,address,sex);
    }

    @Override
    public int delete(int id) {
        return studentDao.delete(id);
    }

    @Override
    public int update(int id, String name, String address, String sex) {
        return studentDao.update(id,name,address,sex);
    }
}
